﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChietTinhLandTour.aspx.cs" Inherits="DLV.BackEnd.Pages.ChietTinhLandTour" %>

<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="DLV.Data.Entities" %>
<%@ Import Namespace="DLV.Library.Utilities" %>

<asp:content id="Content1" contentplaceholderid="placeHolderContent" runat="server">
    <style>
        .report {
            margin-top: 40px;
        }

        .head {
            width: 100%;
            overflow: hidden;
        }

            .head > .logo {
                width: 20%;
                float: left;
                margin-right: 1%;
            }

                .head > .logo img {
                    display: block;
                    margin: 0 auto;
                }

            .head > .table {
                width: 78%;
                float: right;
            }

                .head > .table > table {
                    width: 100%;
                    border-top: 1px solid #000;
                    border-left: 1px solid #000;
                }

                    .head > .table > table th {
                        padding: 0px 0;
                        font-size: 20px;
                        border-bottom: 1px solid #000;
                        border-right: 1px solid #000;
                        background-color: #F2DCDB;
                    }

                    .head > .table > table td {
                        padding: 7px;
                        border-bottom: 1px solid #000;
                        border-right: 1px solid #000;
                    }

        .service {
            width: 100%;
            margin-top: 20px;
        }

            .service > table {
                width: 100%;
                margin-bottom: 20px;
                border-top: 1px solid #000;
                border-left: 1px solid #000;
            }

                .service > table th {
                    padding: 5px 0;
                    border-bottom: 1px solid #000;
                    border-right: 1px solid #000;
                    background: #F2DCDB;
                }

                    .service > table th.first {
                        background-color: #92CDDC;
                        width: 8%;
                    }

                .service > table td {
                    padding: 7px;
                    border-bottom: 1px solid #000;
                    border-right: 1px solid #000;
                }

                .service > table .tr {
                    text-align: right;
                }

        div {
            margin: 0;
            padding: 0;
        }
    </style>
    <link href="../favicon.png" rel="icon" type="image/x-icon" >
	<link rel="stylesheet" href="images/mystyle.css" type="text/css" media="screen">
    
   
	<script type="text/javascript" src="images/jquery.min.js"></script>
	<script type="text/javascript">

	    $(document).ready(function () {
	        // Tạo các biến chứa các giá trị cần thiết
	        var acc_head = $('.accordion_menu > li > a'),
				acc_body = $('.accordion_menu li > .sub-menu');

	        // Mở menu tab đầu tiên khi load trang web
	        acc_head.first().addClass('active').next().slideDown('normal');

	        // Tạo sự kiện click cho các thẻ a trong tab
	        acc_head.on('click', function (event) {

	            // Không cho link đến thẻ a trong tab
	            event.preventDefault();

	            // Hiển thị và ẩn tab khi ta click
	            if ($(this).attr('class') != 'active') {
	                acc_body.slideUp('normal');
	                $(this).next().stop(true, true).slideToggle('normal');
	                acc_head.removeClass('active');
	                $(this).addClass('active');
	            }
	        });
	    });
	</script>

    <div class="report">
        <div class="head">
            <div class="logo">
                <a href="http://dulichviet.com.vn"><img src="/images/logo.png" /></a>
            </div>    
            <div class="table">
                <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <th colspan="4">BẢNG TÍNH GIÁ</th>
                    </tr>
                    <tr>
                        <td><b>Tên đoàn</b></td>
                        <td><%=tourInfo.TourName%></td>
                        <td><b>Code đoàn</b></td>
                        <td>DLV<%=tourInfo.TourId%></td>
                    </tr>
                    <tr>
                        <td><b>Loại hình đoàn</b></td>
                        <td><%=tourInfo.GroupType%></td>
                        <td><b>Loại tour</b></td>
                        <td><%=tourInfo.TourTypeId%></td>
                    </tr>
                    <tr>
                        <td><b>Điểm khởi hành</b></td>
                        <td><%=tourInfo.LocationBegin%></td>
                       </tr>
                    <tr>
                        <td><b>Số lượng khách</b></td>
                        <td>Người lớn: <%=tourInfo.QuantityAdult%> | Trẻ em: <%=tourInfo.QuantityChild%> | Trẻ nhỏ: <%=tourInfo.QuantityBaby%></td>
                        <td><b>Đối tượng khách</b></td>
                        <td>Chọn đối tượng khách</td>
                    </tr>
                    <tr>
                        <td><b>Số hướng dẫn viên</b></td>
                        <td>Chọn số</td>
                        <td><b>Yêu cầu</b></td>
                        <td>Chọn loại HDV</td>
                    </tr>
                    <tr>
                        <td><b>Ngày khởi hành</b></td>
                        <td><%=tourInfo.BeginDate%></td>
                        <td><b>Ngày kết thúc</b></td>
                        <td><%=tourInfo.EndDate%></td>
                    </tr>
                    <tr>
                        <td><b>Tổng số ngày</b></td>
                        <td><%=tourInfo.QuantityDay%></td>
                        <td><b>Tổng số đêm</b></td>
                        <td><%=tourInfo.QuantityNight%></td>
                    </tr>
                     <tr>
                        <td><b>Mùa</b></td>
                        <td><%=tourInfo.Season%></td>
                        <td><b>Thị trường</b></td>
                        <td><%=tourInfo.MartName%></td>
                    </tr>
                </table>
            </div>
        </div>  
        
         <ul class="accordion_menu">
			<li>
				<a href="#">CHIẾT TÍNH LAND TOUR</a>
				<ul class="sub-menu" style="display: block; ">
					<li>
                        <div class="service">
                            <table cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                    <th rowspan="2">NHÀ CUNG CẤP</th>
                                    <th rowspan="2">TÊN LAND TOUR</th>
                                    <th rowspan="2">NGÀY BĐ</th>
                                    <th colspan="3">CHI PHÍ</th>
                                    <th colspan="3">SỐ KHÁCH</th>
                                    <th rowspan="2">VAT</th>
                                    <th rowspan="2">TỔNG</th>
                                    <th rowspan="2">GHI CHÚ</th>
                                    <th rowspan="2"></th>
                                </tr>
                                <tr>
                                    <th>NGƯỜI LỚN</th>
                                    <th>TRẺ EM</th>
                                    <th>TRẺ NHỎ</th>
                                    <th>NGƯỜI LỚN</th>
                                    <th>TRẺ EM</th>
                                    <th>TRẺ NHỎ</th>
                                </tr>

                                <% foreach (DLV.Data.Entities.CalculatorInfo calculatorLandTour in LandTourList)
                                   { %>
                                <tr class="ListLandTour" id="LandTour-<%=calculatorLandTour.CalculatorId%>">
                                   <td><%=calculatorLandTour.PartnerName%></td>
                                    <td><%=calculatorLandTour.LandTourName%></td>
                                    <td><%=calculatorLandTour.DateBegin.ToShortDateString()%></td>
                                   <td><%=calculatorLandTour.PriceAdults.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                                    <td><%=calculatorLandTour.PriceChild.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                                    <td><%=calculatorLandTour.PriceBaby.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                                    <td><%=calculatorLandTour.QuantityAdults%></td>
                                    <td><%=calculatorLandTour.QuantityChild%></td>
                                    <td><%=calculatorLandTour.QuantityBaby%></td>
                                    <td><%=calculatorLandTour.Vat%></td>
                                    <td><%=(calculatorLandTour.TotalPriceLandTourAdults+calculatorLandTour.TotalPriceLandTourChilds+calculatorLandTour.TotalPriceLandTourBabys).ToString("#,###", new CultureInfo("vi-VN"))%></td>
                                    <td><%=calculatorLandTour.Note %></td>
                                    <td>
                                        <input class="btnUpdateLandTour"  type="button" value="Cập nhật" calculatorid="<%=calculatorLandTour.CalculatorId%>" />
                                        <input class="btnDeleteLandTour"  type="button" value="Xóa" calculatorid="<%=calculatorLandTour.CalculatorId%>" />
                                    </td>
                                </tr>
                
                                <%} %>
                                <tr></tr>
                                 <tr id="new-ticket-LandTour">
                                    <td><asp:DropDownList ID="ddlPartnerLandTour" runat="server" Width="150px"></asp:DropDownList></td>
                                    <td><asp:DropDownList ID="ddlLandTour" runat="server" Width="150px"></asp:DropDownList></td>
                                    <td><input type="text" id="dteBeginDateLandTour" style="width:70px;" placeholder="Clic chọn ngày" readonly="readonly" runat="server" /></td>
                                    <td><asp:TextBox id="txtPriceAdultLandTour" runat="server" Width="50px"></asp:TextBox></td>
                                    <td><asp:TextBox id="txtPriceChildLandTour" runat="server" Width="50px"></asp:TextBox></td>
                                     <td><asp:TextBox id="txtPriceBabyLandTour" runat="server" Width="50px"></asp:TextBox></td>
                                    <td><asp:TextBox id="txtQuantityAdultLandTour" runat="server" Width="50px"></asp:TextBox></td>
                                    <td><asp:TextBox id="txtQuantityChildLandTour" runat="server" Width="50px"></asp:TextBox></td>
                                     <td><asp:TextBox id="txtQuantityBabyLandTour" runat="server" Width="50px"></asp:TextBox></td>
                                    <td><asp:TextBox ID="txtVATLandTour" runat="server" Width="50px"></asp:TextBox></td>
                                    <td><asp:Label id="lbTotalPriceLandTour" runat="server" Width="50px"></asp:Label></td>
                                     <td><asp:TextBox ID="txtNote" runat="server" Width="50px"></asp:TextBox></td>
                                    <td id="toolbar-save" class="button">
						                 <input  id="btnInsertLandTour" class="btnsave" type="button" value="Thêm" calculatorid="-1"/>
                                        <input id="btnDeleteLandTour" class="btnDeleteLandTour"  type="button" value="Hủy" calculatorid="-1" />
					                </td>
                                </tr>
                                <tr>
                                    <td colspan="11"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                                    <td class="tr" id="TotalLandTourPrices"><%=TotalLandTourPrices.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                                    </tr>
                                <tr>
                                    <td colspan="11"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                                    <td class="tr" id="TotalLandTourPricesAdults"><%=TotalLandTourPricesAdults.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                                    </tr>
                                <tr>
                                    <td colspan="11"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                                    <td class="tr" id="TotalLandTourPricesChild"><%=TotalLandTourPricesChild.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                                   </tr>
                                <tr>
                                    <td colspan="11"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ NHỎ</b></td>
                                    <td class="tr" id="TotalLandTourPricesBaby"><%=TotalLandTourPricesBaby.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    
                                </tr>
                            </table>
                        </div>
                    
			    </li>
			</ul>
			<li>
				<a href="#" class="">II. Bài viết về Design</a>
				<ul class="sub-menu" style="display: none; ">
					<li>
				
                        <div class="service">
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <th rowspan="2">NHÀ CUNG CẤP</th>
                    <th rowspan="2">TÊN LAND TOUR</th>
                    <th rowspan="2">NGÀY BĐ</th>
                    <th colspan="3">CHI PHÍ</th>
                    <th colspan="3">SỐ KHÁCH</th>
                    <th rowspan="2">VAT</th>
                    <th rowspan="2">TỔNG</th>
                    <th rowspan="2">GHI CHÚ</th>
                    <th rowspan="2"></th>
                </tr>
                <tr>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                    <th>TRẺ NHỎ</th>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                    <th>TRẺ NHỎ</th>
                </tr>

                <% foreach (DLV.Data.Entities.CalculatorInfo calculatorLandTour in LandTourList)
                   { %>
                <tr class="ListLandTour" id="LandTour-<%=calculatorLandTour.CalculatorId%>">
                   <td><%=calculatorLandTour.PartnerName%></td>
                    <td><%=calculatorLandTour.LandTourName%></td>
                    <td><%=calculatorLandTour.DateBegin.ToShortDateString()%></td>
                   <td><%=calculatorLandTour.PriceAdults.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    <td><%=calculatorLandTour.PriceChild.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    <td><%=calculatorLandTour.PriceBaby.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    <td><%=calculatorLandTour.QuantityAdults%></td>
                    <td><%=calculatorLandTour.QuantityChild%></td>
                    <td><%=calculatorLandTour.QuantityBaby%></td>
                    <td><%=calculatorLandTour.Vat%></td>
                    <td><%=(calculatorLandTour.TotalPriceLandTourAdults+calculatorLandTour.TotalPriceLandTourChilds+calculatorLandTour.TotalPriceLandTourBabys).ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    <td><%=calculatorLandTour.Note %></td>
                    <td>
                        <input class="btnUpdateLandTour"  type="button" value="Cập nhật" calculatorid="<%=calculatorLandTour.CalculatorId%>" />
                        <input class="btnDeleteLandTour"  type="button" value="Xóa" calculatorid="<%=calculatorLandTour.CalculatorId%>" />
                    </td>
                </tr>
                
                <%} %>
                <tr></tr>
                 <tr id="new-ticket-LandTour">
                    <td><asp:DropDownList ID="DropDownList1" runat="server" Width="150px"></asp:DropDownList></td>
                    <td><asp:DropDownList ID="DropDownList2" runat="server" Width="150px"></asp:DropDownList></td>
                    <td><input type="text" id="Text1" style="width:70px;" placeholder="Clic chọn ngày" readonly="readonly" runat="server" /></td>
                    <td><asp:TextBox id="TextBox1" runat="server" Width="50px"></asp:TextBox></td>
                    <td><asp:TextBox id="TextBox2" runat="server" Width="50px"></asp:TextBox></td>
                     <td><asp:TextBox id="TextBox3" runat="server" Width="50px"></asp:TextBox></td>
                    <td><asp:TextBox id="TextBox4" runat="server" Width="50px"></asp:TextBox></td>
                    <td><asp:TextBox id="TextBox5" runat="server" Width="50px"></asp:TextBox></td>
                     <td><asp:TextBox id="TextBox6" runat="server" Width="50px"></asp:TextBox></td>
                    <td><asp:TextBox ID="TextBox7" runat="server" Width="50px"></asp:TextBox></td>
                    <td><asp:Label id="Label1" runat="server" Width="50px"></asp:Label></td>
                     <td><asp:TextBox ID="TextBox8" runat="server" Width="50px"></asp:TextBox></td>
                    <td id="toolbar-save" class="button">
						 <input  id="btnInsertLandTour" class="btnsave" type="button" value="Thêm" calculatorid="-1"/>
                        <input id="btnDeleteLandTour" class="btnDeleteLandTour"  type="button" value="Hủy" calculatorid="-1" />
					</td>
                </tr>
                <tr>
                    <td colspan="11"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                    <td class="tr" id=""><%=TotalLandTourPrices.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    </tr>
                <tr>
                    <td colspan="11"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                    <td class="tr" id=""><%=TotalLandTourPricesAdults.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    </tr>
                <tr>
                    <td colspan="11"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                    <td class="tr" id=""><%=TotalLandTourPricesChild.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                   </tr>
                <tr>
                    <td colspan="11"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ NHỎ</b></td>
                    <td class="tr" id=""><%=TotalLandTourPricesBaby.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    
                </tr>
                </table>
               
               </div>

				    </li>
				</ul>
			</li>
			
			<li>
				<a href="#" class="">III. Bài viết về Development PHP</a>
				<ul class="sub-menu" style="display: none; ">
					<li><a href="http://2cweb.vn/news/php-mysql/tim-kiem-du-lieu-voi-php-ket-hop-ajax-jquery-12-51.html" target="_blank"><em>01</em>TÌM KIẾM DỮ LIỆU VỚI PHP KẾT HỢP AJAX JQUERY</a></li>
					<li><a href="http://2cweb.vn/news/php-mysql/9-syntax-highlighting-lam-dep-code-trong-bai-viet-12-40.html" target="_blank"><em>02</em>9 SYNTAX HIGHLIGHTING LÀM ĐẸP CODE TRONG BÀI VIẾT</a></li>
				</ul>
			</li>
			
			<li>
				<a href="#" class="">IV. Bài viết về jQuery - Ajax</a>
				<ul class="sub-menu" style="display: none; ">
					<li><a href="http://2cweb.vn/news/jquery-javascript/dung-mootools-tao-thu-vien-trung-bay-anh-voi-hieu-ung-dep-mat-11-37.html" target="_blank"><em>01</em>DÙNG MOOTOOLS TẠO THƯ VIỆN TRƯNG BÀY ẢNH VỚI HIỆU ỨNG ĐẸP MẮT</a></li>
					<li><a href="http://2cweb.vn/news/jquery-javascript/jquery-validate-plugin-kiem-tra-du-lieu-nhap-tren-form-11-35.html" target="_blank"><em>02</em>JQUERY VALIDATE - PLUGIN KIỂM TRA DỮ LIỆU NHẬP TRÊN FORM</a></li>
		        </ul>
			</li>
			
		</ul>
    </div>
    <link rel="stylesheet" href="/css/datepicker/jquery.ui.all.css" />
	<script type="text/javascript" src="/js/ui/jquery.ui.core.js"></script>
	<script type="text/javascript" src="/js/ui/jquery.ui.datepicker.js"></script>
	<script type="text/javascript">
	    $(function () {
	        $("#<%= dteBeginDateLandTour.ClientID%>").datepicker({
	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });

	    });
	</script>
    

    <script src="/js/jquery.address.js"></script>
    <script src="/js/jquery.ChietTinhLandTour.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            InsertCalculatorLandTour('#<%=ddlPartnerLandTour.ClientID%>', '#<%=ddlLandTour.ClientID%>', '#<%=dteBeginDateLandTour.ClientID%>', '#<%=txtPriceAdultLandTour.ClientID%>', '#<%=txtPriceChildLandTour.ClientID%>', '#<%=txtQuantityAdultLandTour.ClientID%>', '#<%=txtQuantityChildLandTour.ClientID%>', '#<%=txtVATLandTour.ClientID%>', '#<%=lbTotalPriceLandTour.ClientID%>', '<%=tourInfo.TourId%>', '#<%=txtPriceBabyLandTour.ClientID%>', '#<%=txtQuantityBabyLandTour.ClientID%>', '#<%=txtNote.ClientID%>');
        });
    </script>
</asp:content>

